#ifndef GOOGLE_PROTOBUF_COMPILER_DOX_DOX_FIELD_H__
#define GOOGLE_PROTOBUF_COMPILER_DOX_DOX_FIELD_H__

#include <map>
#include <string>
#include "dox_field.h"

namespace google {
namespace protobuf {
namespace compiler {
namespace dox {

class DoxFieldGenerator : public FieldGenerator {
 public:
  explicit DoxFieldGenerator(const FieldDescriptor* descriptor,
                                   const Options& options);
  ~DoxFieldGenerator();

  // implements FieldGenerator ---------------------------------------
  void GeneratePrivateMembers(io::Printer* printer) const;
  void GenerateAccessorDeclarations(io::Printer* printer) const;
  void GenerateInlineAccessorDefinitions(io::Printer* printer) const;
  void GenerateClearingCode(io::Printer* printer) const;
  void GenerateMergingCode(io::Printer* printer) const;
  void GenerateSwappingCode(io::Printer* printer) const;
  void GenerateConstructorCode(io::Printer* printer) const;
  void GenerateMergeFromCodedStream(io::Printer* printer) const;
  void GenerateSerializeWithCachedSizes(io::Printer* printer) const;
  void GenerateSerializeWithCachedSizesToArray(io::Printer* printer) const;
  void GenerateByteSize(io::Printer* printer) const;

 private:
  const FieldDescriptor* descriptor_;
  map<string, string> variables_;

  GOOGLE_DISALLOW_EVIL_CONSTRUCTORS(DoxFieldGenerator);
};

}  // namespace dox
}  // namespace compiler
}  // namespace protobuf

}  // namespace google
#endif  // GOOGLE_PROTOBUF_COMPILER_DOX_DOX_FIELD_H__
